//
//  YSOrderDeliveryCell.m
//  Yueshi
//
//  Created by Northwan on 15/8/5.
//  Copyright (c) 2015年 悦食中国. All rights reserved.
//

#import "YSOrderDeliveryCell.h"

@interface YSOrderDeliveryCell()
@property (weak, nonatomic) IBOutlet UILabel *infoLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UIView *iconView;
@end

@implementation YSOrderDeliveryCell

- (void)awakeFromNib {
    [self.iconView setCornerRadius:self.iconView.width/2 borderWidth:0 borderColor:[UIColor clearColor]];
}

+(instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *CellIdentiferId = @"YSOrderDeliveryCell";
    YSOrderDeliveryCell *cell =  [tableView dequeueReusableCellWithIdentifier:CellIdentiferId];
    if(cell == nil){
        NSArray *nibs = [[NSBundle mainBundle]loadNibNamed:@"YSOrderDeliveryCell" owner:nil options:nil];
        cell = [nibs lastObject];
    }
    return cell;
}
-(void)setItem:(DeliverItem *)item{
    [self.infoLabel setText:item.context];
    [self.timeLabel setText:item.time];
}
@end
